import 'package:flutter/material.dart';

class OrderItemCell extends StatelessWidget {
  //const OrderItemCell({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final i = 100;
    final time = DateTime.now();
    return Container(
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: <Widget>[
          Row(
            children: <Widget>[Text('订单 id'), Text('付款方式')],
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
          ),
          Text(
              '地址：balabalabalabalabalabalabalabalabalabalabalabalabalabalabalabala'),
          Divider(),
          Text('商品 x1'),
          Row(
            children: <Widget>[
              Text('商品'),
              SizedBox(
                width: 8,
              ),
              Text('x1'),
            ],
          ),
          Wrap(
            alignment: WrapAlignment.end,
            children: <Widget>[Text('￥20.00'), Text('共2件商品'), Text('下单时间：$i')],
          ),
          Divider(),
          Row(
            children: <Widget>[
              FlatButton(
                child: Text('联系客户'),
                color: Colors.grey,
                onPressed: () {
                  print('联系客户');
                },
              ),
              Row(
                children: <Widget>[
                  FlatButton(
                    child: Text('拒单'),
                    color: Colors.grey,
                    onPressed: () {
                      print('拒单');
                    },
                  ),
                  SizedBox(
                    width: 10,
                  ),
                  FlatButton(
                    child: Text('接单'),
                    color: Colors.blue,
                    onPressed: () {
                      print('接单');
                    },
                  )
                ],
              )
            ],
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
          )
        ],
      ),
      padding: EdgeInsets.all(10),
      decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(10),
          boxShadow: [
            BoxShadow(
                color: Colors.grey,
                offset: Offset(1, 1),
                blurRadius: 10,
                spreadRadius: 1)
          ],
          color: Colors.white),
    );
  }
}
